import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;


public class Mash {
	private final int cap;
	private List<Knoten> kList;
	
	
	public Mash(int cap){
		this.cap = cap;
		kList = new CopyOnWriteArrayList<Knoten>();	
	}
	
	public Mash(int cap, List<Knoten> neu){
		this.cap = cap;
		this.kList = new CopyOnWriteArrayList<Knoten>();
		for (Knoten knoten : neu){
			this.add(knoten);
		}
	}
	
	
	public void add(Knoten k){
		kList.add(k);
		k.setMash(this);
	}

	public List<Knoten> getkList() {
		return kList;
	}

	public int getCap() {
		return cap;
	}

	public void removeKnList(List<Knoten> toRemove){
		for(Knoten k : toRemove){
			kList.remove(k);
		}
	}
	
	
}
